package com.mi.rof.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
/**
 * @author zwq  yyy
 */
@Data
@AllArgsConstructor
public class Result<T> {

    public static final String SUCCESS = "200";

    private String code;

    private String msg;

    private T data;


    public static <T> Result<T> successResult() {
        return new Result<>("200", "success", (T) "");
    }


    public static <T> Result<T> successResult(T data) {
        return new Result<>("200", "success", data);
    }

    public static <T> Result<T> fail(String code, String msg) {
        return new Result<>(code, msg, null);
    }


}

